home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Strate…Tools for the Enterprise / Microsoft Internet Strategy & Tools for the Enterprise.iso / bkoffice / inetsrv.nts / nt351qfe.usa / mpr / ppc / winnt / oemnxptc.inf < prev   
INI File  |  1995-10-07  |  73KB  |  1,567 lines

  1. [Identification]
  2.     OptionType = NetTransport
  3. [Options]
  4.     TC
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. NetBTEventDLL   = "%SystemRoot%\System32\netevent.dll"
  11. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  12. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  13. Sockmaxlength           = 16
  14. Sockminlength           = 16
  15. ProductDHCPName          = "DHCP"
  16. ProductDHCPImagePath     = "%SystemRoot%\System32\services.exe"
  17. ProductDHCPSvcType       = "autoserviceshare"
  18. ProductNETBTName          = "NetBT"
  19. ProductNETBTImagePath     = "%SystemRoot%\System32\drivers\netbt.sys"
  20. ProductNETBTSvcType       = "kernel"
  21. NetRuleNETBTType          = "netbt netBiosTransport netbtTransport"
  22. NetRuleNETBTClass         = {"netbtTransport netBiosTransport"}
  23. NetRuleNETBTUse           = $(SoftwareType)" yes yes"
  24. NetRuleNETBTBindForm      = """NetBT"" yes yes simple"
  25. ProductLMHOSTSName      = "LmHosts"
  26. ProductLMHOSTSImagePath  = "%SystemRoot%\System32\services.exe"
  27. ProductTCName      = "Tcpip"
  28. ProviderName       = $(ProductTCName)
  29. ProductProviderImagePath = "%SystemRoot%\System32\wsock32.dll"
  30. ProductTCImagePath  = "\SystemRoot\System32\drivers\tcpip.sys"
  31. ProductTCWshDllPath  = "%SystemRoot%\System32\wshtcpip.dll"
  32. ProductTCSvcType     = "kernel"
  33. NetRuleTCType        = "tcpip tcpipTransport"
  34. NetRuleTCUse         = $(SoftwareType)" yes yes"
  35. NetRuleTCBindForm    = """Tcpip"" yes yes container"
  36. NetRuleTCBindable    = {"tcpipService tcpipTransport non exclusive 100","tcpipTransport ndisDriver non non 100"}
  37. NetRuleTCClass       = {"tcpipTransport basic","tcpipService basic yes"}
  38. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  39. OldProductKeyName  = $(!NTN_ServiceBase)"\Tcpip\Parameters"
  40. LinkageKeyName  = $(!NTN_ServiceBase)"\Tcpip\Linkage"
  41. ParametersKeyName  = $(!NTN_ServiceBase)"\Tcpip\Parameters"
  42. ServiceTCKeyName = $(!NTN_ServiceBase)"\Tcpip"
  43. ServiceKeyName  = $(!NTN_ServiceBase)
  44. NetBTLinkageKeyName  = $(!NTN_ServiceBase)"\NetBT\Linkage"
  45. AdaptersKeyName  = $(!NTN_ServiceBase)"\NetBT\Adapters"
  46. PerformanceName  = $(!NTN_ServiceBase)"\NetBT\Performance"
  47. NetBTParamKeyName  = $(!NTN_ServiceBase)"\NetBT\Parameters"
  48. DosDevices      = "SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices"
  49. [GeneralConstants]
  50. UtilityInf       = "UTILITY.INF"
  51. subroutineinf    = "SUBROUTN.INF"
  52. IPINFOINF        = "ipinfo.inf"
  53. SoftwareType     = "transport"
  54. Exit_Code        = 0
  55. BillboardVisible = 0
  56. from      = ""
  57. to        = ""
  58. ExitCodeOk     = 0
  59. ExitCodeCancel = 1
  60. ExitCodeFatal  = 2
  61. KeyNull         = ""
  62. MAXIMUM_ALLOWED   = 33554432
  63. SERVICE_NO_CHANGE = 4294967295
  64. RegistryErrorIndex = NO_ERROR
  65. KeyProduct      = ""
  66. KeyParameters   = ""
  67. TRUE            = 1
  68. FALSE           = 0
  69. NoTitle         = 0
  70. ExitState   = "Active"
  71. OldVersionExisted = $(FALSE)
  72. DriverPath      = $(!STF_NTPATH)\drivers
  73. [date]
  74.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  75. [Identify]
  76.     read-syms Identification
  77.     set Status     = STATUS_SUCCESSFUL
  78.     set Identifier = $(OptionType)
  79.     set Media      = #("Source Media Descriptions", 1, 1)
  80.     Return $(Status) $(Identifier) $(Media)
  81. [ReturnOptions]
  82.     set Status        = STATUS_FAILED
  83.     set OptionList     = {}
  84.     set OptionTextList = {}
  85.     set LanguageList = ^(LanguagesSupported, 1)
  86.     Ifcontains(i) $($0) in $(LanguageList)
  87.         goto returnoptions
  88.     else
  89.         set Status = STATUS_NOLANGUAGE
  90.         goto finish_ReturnOptions
  91.     endif
  92. returnoptions = +
  93.     set OptionList     = ^(Options, 1)
  94.     set OptionTextList = ^(OptionsText$($0), 1)
  95.     set Status         = STATUS_SUCCESSFUL
  96. finish_ReturnOptions = +
  97.     Return $(Status) $(OptionList) $(OptionTextList)
  98. [InstallOption]
  99.     set Option   = $($1)
  100.     set SrcDir   = $($2)
  101.     set AddCopy  = $($3)
  102.     set DoCopy   = $($4)
  103.     set DoConfig = $($5)
  104.     set InstallFromRas = $($6)
  105.     set EnableDHCPFlag = $($7)
  106.     set InstallList = $($8)
  107.     ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  108.         ifstr(i) $(UnattendedEnableDHCP) == NO
  109.             set EnableDHCPFlag = 0
  110.         else
  111.             set EnableDHCPFlag = 1
  112.         endif
  113.     endif
  114.      ifstr(i) $(EnableDHCPFlag) == ""
  115.         set EnableDHCPFlag = 0
  116.     endif
  117.     ifstr(i) $(InstallList) == ""
  118.         set InstallList = {"1","1","0","0","0","0","0","0"}
  119.     endif
  120.     set LanguageList = ^(LanguagesSupported, 1)
  121.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  122.         Return STATUS_NOLANGUAGE
  123.     endif
  124.     Debug-Output "OEMNXPTC.INF: STF_CWDIR is: "$(!STF_CWDIR)
  125.     Debug-Output "OEMNXPTC.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  126.     set-subst LF = "\n"
  127.     read-syms GeneralConstants
  128.     read-syms FileConstants
  129.     read-syms DialogConstants$(!STF_LANGUAGE)
  130.     LoadLibrary "x" $(!STF_CWDDIR)\tcpcfg.dll !TCPCFG_HANDLE
  131.     ifstr(i) $(!NTN_Origination) == "NCPA"
  132.         set Continue = $(OK)
  133.     endif
  134.     read-syms FileConstants$(!STF_LANGUAGE)
  135.     detect date
  136.     set-title  $(FunctionTitle)
  137.     set to   = Begin
  138.     set from = Begin
  139.     set CommonStatus = STATUS_SUCCESSFUL
  140.     EndWait
  141. Begin = +
  142.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  143.         set StartLabel = removeadapter
  144.         set OEM_ABANDON_OPTIONS = {+
  145.             $(ProductDHCPName),+
  146.             $(ProductLMHOSTSName)}
  147.         set OEM_ABANDON_SOFTWARE = {+
  148.             $(ProductTCName),+
  149.             $(ProductNETBTName)}
  150.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  151.         set StartLabel = UpgradeSoftware
  152.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  153.         set IPAddressList  = {}
  154.         set SubnetMaskList = {}
  155.         set StartLabel = configureadapter
  156.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  157.         set StartLabel = bindingadapter
  158.     else
  159.         set StartLabel = installadapter
  160.         set OEM_ABANDON_SOFTWARE = {}
  161.         set OEM_ABANDON_OPTIONS = {}
  162.     endif
  163.     set from = $(fatal)
  164.     set to = $(fatal)
  165.     goto $(StartLabel)
  166. installadapter = +
  167.     Shell "" GetFilesSize
  168.     set SizeList = $($R0)
  169.     ifstr(i) $(!STF_PRODUCT) == "WINNT"
  170.         set OptionFileList = { "oemnsvcu.inf", "oemnxpsn.inf", "oemnsvtp.inf", "oemnsvft.inf", "oemnsvsp.inf"}
  171.         set TcpOptionList  = { "TCPIPCU", "SNMP", "TCPPRINT", "FTPD", "STCPIP"}
  172.         set ProductType = 1 
  173.     else
  174.         set OptionFileList = { "oemnsvcu.inf", "oemnxpsn.inf", "oemnsvtp.inf", "oemnsvft.inf", "oemnsvsp.inf", "oemnsvdh.inf", "oemnsvwi.inf"}
  175.         set TcpOptionList  = { "TCPIPCU", "SNMP", "TCPPRINT", "FTPD", "STCPIP","DHCP", "WINS"}
  176.         set ProductType = 0 
  177.     endif
  178.     ForListDo $(OptionFileList)
  179.         Shell $($) GetFilesSize
  180.         ifstr(i) $($R0) == ""
  181.             set Size = "0"
  182.         else
  183.             set Size = $($R0)
  184.         endif
  185.         set SizeList = $(SizeList)"@"$(Size)
  186.     EndForListDo
  187.     set ErrorCode = "0"
  188.     set fCancel = 1
  189.     set AllInstalledFlag = "0"
  190.     Ifstr(i) $(!STF_INSTALL_MODE) == EXPRESS
  191.     else-Ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  192.     else
  193.         LibraryProcedure ResultList $(!TCPCFG_HANDLE), TcpipOptionDialog $(!STF_HWND),+
  194.                   $(ProductType), $(SizeList), 255, 3
  195.         set ErrorCode = *($(ResultList),1)
  196.         set fCancel = *($(ResultList),2)
  197.         set AllInstalledFlag = *($(ResultList),3)
  198.         set EnableDHCPFlag = *($(ResultList),4)
  199.         set InstallList = *($(ResultList),5)
  200.     endif
  201.     ifstr(i) $(ErrorCode) != "0"
  202.         goto ShellCodeError
  203.     endif
  204.     ifint $(fCancel) == 0
  205.         set CommonStatus = STATUS_USERCANCEL
  206.         goto end
  207.     endif
  208.     ifstr(i) $(AllInstalledFlag) == "1"
  209.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(NoNewComponents)
  210.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  211.             goto ShellCodeError
  212.         endif
  213.         goto end
  214.     EndIf
  215.     Ifcontains(i) "1" in $(InstallList)
  216.         ifstr(i) $(!NTN_InstallMode) == "install"
  217.             Ifstr(i) $(DoCopy) == "YES"
  218.                Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  219.                Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  220.                    Goto ShellCodeError
  221.                Else-Ifstr(i) $($R0) == STATUS_FAILED
  222.                    Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  223.                    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  224.                        goto ShellCodeError
  225.                    endif
  226.                    set Error = $($R0)
  227.                    Goto fatal
  228.                Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  229.                    Goto successful
  230.                Endif
  231.                Set SrcDir = $($R1)
  232.             Endif
  233.         EndIf
  234.     Endif
  235.     ifint *($(InstallList),1) != 1
  236.         goto InstallOtherComponent
  237.     endif
  238.     ifstr(i) $(!NTN_InstallMode) == "install"
  239.         Debug-Output "OEMNXPTC.INF: installadapter: installing [Install-Option]"
  240.         install "Install-Option"
  241.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  242.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  243.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  244.                goto ShellCodeError
  245.            endif
  246.            set Error = $($R0)
  247.            goto fatal
  248.         endif
  249.     endif
  250.     set OEM_ABANDON_ON  = TRUE
  251.     read-syms Billboard1$(!STF_LANGUAGE)
  252.     Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  253.     Set BillboardVisible = 1
  254.     set DoTC        = FALSE
  255.     Set DoLMHOSTS   = FALSE
  256.     Set DoNbt       = FALSE
  257.     Set DoAFD       = FALSE
  258.     Set DoDHCP      = FALSE
  259.     Ifstr(i) $(Option) == TC
  260.         set DoTC       = TRUE
  261.         Set DoLMHOSTS  = TRUE
  262.         Set DoNbt      = TRUE
  263.         Set DoAFD      = TRUE
  264.         Set DoDHCP      = TRUE
  265.     Else
  266.         Debug-Output "OEMNXPTC.INF: Unrecognized option"
  267.     Endif
  268.     StartWait
  269.     Ifstr(i) $(DoLMHOSTS) == TRUE
  270.         Debug-Output "OEMNXPTC.INF: Install LmHosts registry"
  271.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductLMHOSTSName))
  272.         Shell $(UtilityInf), CreateService, $(ProductLMHOSTSName), +
  273.             $(ProductLMHOSTSDisplayName), $(ProductLMHOSTSImagePath), +
  274.             "autoserviceshare", "", {"+NetworkProvider"}, "LocalSystem",+
  275.             $(NetEventDLL)
  276.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  277.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  278.             goto ShellCodeError
  279.         endif
  280.         set RegistryErrorIndex = $($R0)
  281.         CloseRegKey $($R1)
  282.         CloseRegKey $($R2)
  283.         CloseRegKey $($R3)
  284.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  285.             EndWait
  286.             Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  287.             goto fatalregistry
  288.         endif
  289.     endif
  290.     ifstr(i) $(DoDHCP) == TRUE
  291.         Set ThisOption = DHCP
  292.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  293.         Debug-Output "OEMNXPTC.INF: installing DHCP..."
  294.         ifint $(EnableDHCPFlag) == 0
  295.             set ProductDHCPSvcType = serviceshare
  296.         endif
  297.         Shell $(UtilityInf), CreateService, $(Product$(ThisOption)Name),+
  298.             $(Product$(ThisOption)DisplayName),+
  299.             $(Product$(ThisOption)ImagePath),+
  300.             $(Product$(ThisOption)SvcType), "TDI", {"Tcpip","Afd","NetBT"}, "",+
  301.             "%SystemRoot%\System32\dhcpcsvc.dll", 7, "", "", "",+
  302.             "%SystemRoot%\System32\kernel32.dll"
  303.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  304.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  305.             goto ShellCodeError
  306.         endif
  307.         set RegistryErrorIndex = $($R0)
  308.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  309.             EndWait
  310.             Debug-Output "OEMNXPTC.INF: Registry error: Create Service components"
  311.             CloseRegKey $($R1)
  312.             CloseRegKey $($R2)
  313.             CloseRegKey $($R3)
  314.             goto fatalregistry
  315.         endif
  316.         CloseRegKey $($R1)
  317.         Set DhcpParameterKey = $($R2)
  318.         CloseRegKey $($R3)
  319.         CreateRegKey $(DhcpParameterKey) {"Options",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyOptions
  320.         CreateRegKey $(KeyOptions) {"1",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key1
  321.         Shell $(UtilityInf) AddValueList, $(Key1),+
  322.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpSubnetMaskOpt"},+
  323.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  324.         CloseRegKey $(Key1)
  325.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  326.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  327.             goto ShellCodeError
  328.         endif
  329.         CreateRegKey $(KeyOptions) {"3",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key3
  330.         Shell $(UtilityInf) AddValueList, $(Key3),+
  331.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpDefaultGateway"},+
  332.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  333.         CloseRegKey $(Key3)
  334.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  335.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  336.             goto ShellCodeError
  337.         endif
  338.         CreateRegKey $(KeyOptions) {"6",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key6
  339.         Shell $(UtilityInf) AddValueList, $(Key6),+
  340.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpNameServer"},+
  341.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  342.         CloseRegKey $(Key6)
  343.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  344.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  345.             goto ShellCodeError
  346.         endif
  347.         CreateRegKey $(KeyOptions) {"15",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key15
  348.         Shell $(UtilityInf) AddValueList, $(Key15),+
  349.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpDomain"},+
  350.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  351.         CloseRegKey $(Key15)
  352.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  353.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  354.             goto ShellCodeError
  355.         endif
  356.         CreateRegKey $(KeyOptions) {"44",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key44
  357.         Shell $(UtilityInf) AddValueList, $(Key44),+
  358.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Adapters\?\DhcpNameServer"},+
  359.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  360.         CloseRegKey $(Key44)
  361.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  362.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  363.             goto ShellCodeError
  364.         endif
  365.         CreateRegKey $(KeyOptions) {"46",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key46
  366.         Shell $(UtilityInf) AddValueList, $(Key46),+
  367.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Parameters\DhcpNodeType"},+
  368.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_DWORD)}}
  369.         CloseRegKey $(Key46)
  370.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  371.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  372.             goto ShellCodeError
  373.         endif
  374.         CreateRegKey $(KeyOptions) {"47",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key47
  375.         Shell $(UtilityInf) AddValueList, $(Key47),+
  376.             {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\NetBT\Parameters\DhcpScopeID"},+
  377.             {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  378.         CloseRegKey $(Key47)
  379.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  380.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  381.             goto ShellCodeError
  382.         endif
  383.         set RegistryErrorIndex = $($R0)
  384.         CloseRegKey $(KeyOptions)
  385.         CloseRegKey $(DhcpParameterKey)
  386.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  387.             EndWait
  388.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  389.             goto fatalregistry
  390.         endif
  391.     endif
  392.     ifstr(i) $(DoTC) == TRUE
  393.         set ThisOption = "TC"
  394.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductTCName))
  395.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  396.             $(Product$(ThisOption)Name),+
  397.             $(Product$(ThisOption)Name),+
  398.             $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  399.             $(Product$(ThisOption)ImagePath),+
  400.             $(Product$(ThisOption)SvcType),+
  401.             "", {}, "", $(NetEventDLL)
  402.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  403.             Debug-Output "OEMNXPTC.INF: ShellCode error, add software component"
  404.             goto ShellCodeError
  405.         endif
  406.         set RegistryErrorIndex = $($R0)
  407.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  408.             EndWait
  409.             Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  410.             CloseRegKey $($R1)
  411.             CloseRegKey $($R2)
  412.             CloseRegKey $($R3)
  413.             CloseRegKey $($R4)
  414.             CloseRegKey $($R5)
  415.             goto fatalregistry
  416.         endif
  417.         Set TcpVersKeyHandle  = $($R1)
  418.         Set TcpRulesKeyHandle = $($R2)
  419.         Set TcpSvcKeyHandle   = $($R3)
  420.         Set TcpParmKeyHandle  = $($R4)
  421.         Set TcpLinkageHandle  = $($R5)
  422.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  423.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  424.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  425.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  426.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  427.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  428.                            {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  429.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  430.         Shell  $(UtilityInf), AddValueList, $(TcpVersKeyHandle), $(NewValueList)
  431.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  432.             Debug-Output "OEMNXPTC.INF: ShellCode error, add value list"
  433.             goto ShellCodeError
  434.         endif
  435.         set RegistryErrorIndex = $($R0)
  436.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  437.             EndWait
  438.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  439.             CloseRegKey $(TcpVersKeyHandle)
  440.             CloseRegKey $(TcpRulesKeyHandle)
  441.             CloseRegKey $(TcpSvcKeyHandle)
  442.             CloseRegKey $(TcpParmKeyHandle)
  443.             CloseRegkey $(TcpLinkageHandle)
  444.             goto fatalregistry
  445.         Endif
  446.         CreateRegKey $(TcpParmKeyHandle) {"PersistentRoutes",$(NoTitle),GenericClass} "" +
  447.                 $(MAXIMUM_ALLOWED) "" KeyPersistentRoutes
  448.         CloseRegKey $(KeyPersistentRoutes)
  449.         CreateRegKey $(TcpSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" +
  450.                 $(MAXIMUM_ALLOWED) "" KeyPerformance
  451.         set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfctrs.dll"},+
  452.                            {Open,$(NoTitle),$(!REG_VT_SZ),"OpenTcpIpPerformanceData"},+
  453.                            {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectTcpIpPerformanceData"},+
  454.                            {Close,$(NoTitle),$(!REG_VT_SZ),"CloseTcpIpPerformanceData"}}
  455.         Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  456.         set RegistryErrorIndex = $($R0)
  457.         CloseRegKey $(KeyPerformance)
  458.         Ifstr $(RegistryErrorIndex) != NO_ERROR
  459.             EndWait
  460.             Debug-Output "OEMNXPTC.INF: Registry error: add performance info."
  461.             CloseRegKey $(TcpVersKeyHandle)
  462.             CloseRegKey $(TcpRulesKeyHandle)
  463.             CloseRegKey $(TcpSvcKeyHandle)
  464.             CloseRegKey $(TcpParmKeyHandle)
  465.             CloseRegkey $(TcpLinkageHandle)
  466.             goto fatalregistry
  467.         Endif
  468.         CreateRegKey $(TcpSvcKeyHandle) {"ServiceProvider",$(NoTitle),GenericClass} "" +
  469.                 $(MAXIMUM_ALLOWED) "" KeyNetworkProvider
  470.         set NewValueList = {{Class,$(NoTitle),$(!REG_VT_DWORD),8},+
  471.                            {DnsPriority,$(NoTitle),$(!REG_VT_DWORD),2000},+
  472.                            {HostsPriority,$(NoTitle),$(!REG_VT_DWORD),500},+
  473.                            {LocalPriority,$(NoTitle),$(!REG_VT_DWORD),499},+
  474.                            {ProviderPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ProductProviderImagePath)},+
  475.                            {NetbtPriority,$(NoTitle),$(!REG_VT_DWORD),2001}}
  476.         Shell  $(UtilityInf), AddValueList, $(KeyNetworkProvider), $(NewValueList)
  477.         set RegistryErrorIndex = $($R0)
  478.         CloseRegKey $(KeyNetworkProvider)
  479.         Ifstr $(RegistryErrorIndex) != NO_ERROR
  480.             EndWait
  481.             Debug-Output "OEMNXPTC.INF: Registry error: add performance info."
  482.             CloseRegKey $(TcpVersKeyHandle)
  483.             CloseRegKey $(TcpRulesKeyHandle)
  484.             CloseRegKey $(TcpSvcKeyHandle)
  485.             CloseRegKey $(TcpParmKeyHandle)
  486.             CloseRegkey $(TcpLinkageHandle)
  487.             goto fatalregistry
  488.         Endif
  489.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  490.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  491.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  492.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Bindable)},+
  493.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  494.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  495.         Shell  $(UtilityInf), AddValueList, $(TcpRulesKeyHandle), $(NewValueList)
  496.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  497.             Debug-Output "OEMNXPTC.INF: ShellCode error."
  498.             goto ShellCodeError
  499.         endif
  500.         set RegistryErrorIndex = $($R0)
  501.         CloseRegKey $(TcpVersKeyHandle)
  502.         CloseRegKey $(TcpRulesKeyHandle)
  503.         LibraryProcedure ResultHostname $(!TCPCFG_HANDLE), ConvertHostname $(!STF_COMPUTERNAME)
  504.         set NewValueList = {{EnableDHCP,$(NoTitle),$(!REG_VT_DWORD),$(EnableDHCPFlag)},+
  505.                             {DataBasePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\System32\drivers\etc"},+
  506.                             {Domain,$(NoTitle),$(!REG_VT_SZ),""},+
  507.                             {Hostname,$(NoTitle),$(!REG_VT_SZ),$(ResultHostname)},+
  508.                             {NameServer,$(NoTitle),$(!REG_VT_SZ),""},+
  509.                             {ForwardBroadcasts,$(NoTitle),$(!REG_VT_DWORD),0},+
  510.                             {IPEnableRouter,$(NoTitle),$(!REG_VT_DWORD),0},+
  511.                             {SearchList,$(NoTitle),$(!REG_VT_SZ),""}}
  512.         Shell  $(UtilityInf), AddValueList, $(TcpParmKeyHandle), $(NewValueList)
  513.         CloseRegKey $(TcpParmKeyHandle)
  514.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  515.             CloseRegKey $(TcpLinkageHandle)
  516.             CloseRegKey $(TcpSvcKeyHandle)
  517.             EndWait
  518.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  519.             goto fatalregistry
  520.         endif
  521.         Shell $(UtilityInf) AddRpcProtocol "ncacn_ip_tcp" "rpcltc3.dll" "rpclts3.dll"
  522.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  523.             Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol"
  524.             goto ShellCodeError
  525.         Endif
  526.         Set RegistryErrorIndex = $($R0)
  527.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  528.             Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data"
  529.             EndWait
  530.             goto fatalregistry
  531.         Endif
  532.         Shell $(UtilityInf) AddRpcProtocol "ncadg_ip_udp" "rpcdgc3.dll" "rpcdgs3.dll"
  533.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  534.             Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol"
  535.             goto ShellCodeError
  536.         Endif
  537.         Set RegistryErrorIndex = $($R0)
  538.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  539.             Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data"
  540.             EndWait
  541.             goto fatalregistry
  542.         Endif
  543.         Shell $(UtilityInf) AddMixRpcProtocol "Netbios" "tcpip" "ncacn_nb_tcp" "rpcltc5.dll" "rpclts5.dll"
  544.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  545.             Debug-Output "OEMNXPTC.INF: ShellCode error adding RPC procotol (2)"
  546.             goto ShellCodeError
  547.         endif
  548.         Set RegistryErrorIndex = $($R0)
  549.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  550.             Debug-Output "OEMNXPTC.INF: ERROR adding RPC protocol data (2)"
  551.             EndWait
  552.             goto fatalregistry
  553.         Endif
  554.         Shell $(UtilityInf), AddWinsockInfo, +
  555.              $(Product$(ThisOption)Name), +
  556.              $(Product$(ThisOption)WshDllPath), +
  557.              $(Sockmaxlength),$(Sockminlength)
  558.         set RegistryErrorIndex = $($R0)
  559.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  560.             Debug-Output "OEMNXPTC.INF: Registry error: Add Winsock Info."
  561.         Endif
  562.     endif
  563.     Ifstr(i) $(DoNbt) == TRUE
  564.         Set ThisOption = NETBT
  565.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  566.         Debug-Output "OEMNXPTC.INF: installing NETBT..."
  567.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  568.             $(Product$(ThisOption)Name),+
  569.             $(Product$(ThisOption)Name),+
  570.             $(Product$(ThisOption)DisplayName), $(STF_CONTEXTINFNAME),+
  571.             $(Product$(ThisOption)ImagePath), $(Product$(ThisOption)SvcType), "TDI", {}, "", $(NetBTEventDLL)
  572.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573.             Debug-Output "OEMNXPTC.INF: ShellCode error"
  574.             goto ShellCodeError
  575.         endif
  576.         set RegistryErrorIndex = $($R0)
  577.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  578.             EndWait
  579.             Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  580.             CloseRegKey $($R1)
  581.             CloseRegKey $($R2)
  582.             CloseRegKey $($R3)
  583.             CloseRegKey $($R4)
  584.             CloseRegKey $($R5)
  585.             goto fatalregistry
  586.         endif
  587.         Set NBTProductKey       = $($R1)
  588.         Set NBTNetRuleKey       = $($R2)
  589.         Set NBTServiceKey       = $($R3)
  590.         Set NBTParameterKey     = $($R4)
  591.         Set NBTLinkageKey       = $($R5)
  592.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  593.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  594.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  595.                            {Hidden,0,$(!REG_VT_DWORD),1},+
  596.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  597.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  598.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  599.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  600.         Shell  $(UtilityInf), AddValueList, $(NBTProductKey), $(NewValueList)
  601.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  602.             Debug-Output "OEMNXPTC.INF: ShellCode error."
  603.             goto ShellCodeError
  604.         endif
  605.         set RegistryErrorIndex = $($R0)
  606.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  607.             EndWait
  608.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  609.             CloseRegKey $(NBTProductKey)
  610.             CloseRegKey $(NBTNetRuleKey)
  611.             CloseRegKey $(NBTServiceKey)
  612.             CloseRegKey $(NBTParameterKey)
  613.             CloseRegKey $(NBTLinkageKey)
  614.             goto fatalregistry
  615.         endif
  616.         set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"Tcpip"}}}
  617.         Shell  $(UtilityInf), AddValueList, $(NBTLinkageKey), $(NewValueList)
  618.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  619.             Debug-Output "OEMNXPTC.INF: ShellCode error."
  620.             goto ShellCodeError
  621.         endif
  622.         set RegistryErrorIndex = $($R0)
  623.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  624.             EndWait
  625.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  626.             CloseRegKey $(NBTProductKey)
  627.             CloseRegKey $(NBTNetRuleKey)
  628.             CloseRegKey $(NBTServiceKey)
  629.             CloseRegKey $(NBTParameterKey)
  630.             CloseRegKey $(NBTLinkageKey)
  631.             goto fatalregistry
  632.         endif
  633.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  634.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  635.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  636.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  637.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  638.         Shell  $(UtilityInf), AddValueList, $(NBTNetRuleKey), $(NewValueList)
  639.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  640.             Debug-Output "OEMNXPTC.INF: ShellCode error."
  641.             goto ShellCodeError
  642.         endif
  643.         set RegistryErrorIndex = $($R0)
  644.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  645.             EndWait
  646.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  647.             CloseRegKey $(NBTProductKey)
  648.             CloseRegKey $(NBTNetRuleKey)
  649.             CloseRegKey $(NBTServiceKey)
  650.             CloseRegKey $(NBTParameterKey)
  651.             CloseRegKey $(NBTLinkageKey)
  652.             goto fatalregistry
  653.         endif
  654.         Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_tcp"},+
  655.                 {NameServerPort,$(NoTitle),$(!REG_VT_DWORD),137},+
  656.                 {EnableLMHOSTS,$(NoTitle),$(!REG_VT_DWORD),1},+
  657.                 {EnableProxy,$(NoTitle),$(!REG_VT_DWORD),0},+
  658.                 {EnableDNS,$(NoTitle),$(!REG_VT_DWORD),0},+
  659.                 {CacheTimeout,$(NoTitle),$(!REG_VT_DWORD),600000},+
  660.                 {BcastNameQueryCount,$(NoTitle),$(!REG_VT_DWORD),3},+
  661.                 {BcastQueryTimeout,$(NoTitle),$(!REG_VT_DWORD),750},+
  662.                 {NameSrvQueryCount,$(NoTitle),$(!REG_VT_DWORD),3},+
  663.                 {NameSrvQueryTimeout,$(NoTitle),$(!REG_VT_DWORD),1500},+
  664.                 {Size/Small/Medium/Large,$(NoTitle),$(!REG_VT_DWORD),1},+
  665.                 {SessionKeepAlive,$(NoTitle),$(!REG_VT_DWORD),3600000},+
  666.                 {ScopeID,$(NoTitle),$(!REG_VT_SZ),""},+
  667.                 {TransportBindName,$(NoTitle),$(!REG_VT_SZ),"\Device\"},+
  668.                 }
  669.         Shell  $(UtilityInf), AddValueList, $(NBTParameterKey), $(NewValueList)
  670.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  671.             Debug-Output "OEMNXPTC.INF: ShellCode error."
  672.             goto ShellCodeError
  673.         Endif
  674.         set RegistryErrorIndex = $($R0)
  675.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  676.             EndWait
  677.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  678.             CloseRegKey $(NBTProductKey)
  679.             CloseRegKey $(NBTNetRuleKey)
  680.             CloseRegKey $(NBTServiceKey)
  681.             CloseRegKey $(NBTParameterKey)
  682.             CloseRegKey $(NBTLinkageKey)
  683.             goto fatalregistry
  684.         endif
  685.         CreateRegKey $(NBTServiceKey) {"Adapters",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdaptersKey
  686.         CloseRegKey $(AdaptersKey)
  687.         CreateRegKey $(NBTServiceKey) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" PerformanceKey
  688.         Ifstr $(PerformanceKey) != $(KeyNull)
  689.             Set NewValueList = {+
  690.                 {Library,$(NoTitle),$(!REG_VT_SZ),"Perfctrs.dll"},+
  691.                 {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNbtPerformanceData"},+
  692.                 {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNbtPerformanceData"},+
  693.                 {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNbtPerformanceData"},+
  694.                 }
  695.             Shell  $(UtilityInf), AddValueList, $(PerformanceKey), $(NewValueList)
  696.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697.                 Debug-Output "OEMNXPTC.INF: ShellCode error."
  698.                 goto ShellCodeError
  699.             Endif
  700.             CloseRegKey $(PerformanceKey)
  701.         endif
  702.         set RegistryErrorIndex = $($R0)
  703.         CloseRegKey $(NBTProductKey)
  704.         CloseRegKey $(NBTNetRuleKey)
  705.         CloseRegKey $(NBTServiceKey)
  706.         CloseRegKey $(NBTParameterKey)
  707.         CloseRegKey $(NBTLinkageKey)
  708.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  709.             EndWait
  710.             Debug-Output "OEMNXPTC.INF: Registry error: add value list."
  711.             goto fatalregistry
  712.         endif
  713.     Endif
  714.     Ifstr(i) $(DoAFD) == TRUE
  715.         Shell $(UtilityInf) AddAFD
  716.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Afd" $(MAXIMUM_ALLOWED) AfdKey
  717.         ifstr(i) $(AfdKey) != ""
  718.             GetRegValue $(AfdKey) "DependOnGroup" GroupList
  719.             debug-output "DependOnGroup:"$(GroupList)
  720.             set GroupValues = *($(GroupList),4)
  721.             debug-output "DependOnGroup:"$(GroupValues)
  722.             set NewGroupValues = {}
  723.             ForListDo $(GroupValues)
  724.                 ifstr(i) $($) != "TDI"
  725.                     ifstr(i) $(NewGroupValues) == {}
  726.                         Set NewGroupValues = {$($)}
  727.                     else
  728.                         Set NewGroupValues = >($(NewGroupValues), $($))
  729.                     endif
  730.                 endif
  731.             EndForListDo
  732.             SetRegValue $(AfdKey) {"DependOnGroup",$(NoTitle),$(!REG_VT_MULTI_SZ),$(NewGroupValues)}
  733.             CloseRegKey $(AfdKey)
  734.         endif
  735.     Endif
  736.     Shell $(UtilityInf), AddServiceProvider, $(ProviderName), +
  737.         $(ProductProviderImagePath), $(ProviderDisplayName), 8
  738.     set RegistryErrorIndex = $($R0)
  739.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  740.         EndWait
  741.         Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  742.         goto fatalregistry
  743.     endif
  744.     ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  745.         ifstr(i) $(InstallFromRas) != "YES"
  746.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\RASMan" $(MAXIMUM_ALLOWED) RASKey
  747.             ifstr(i) $(RASKey) != ""
  748.                 Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(RASRebindError)
  749.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  750.                     goto ShellCodeError
  751.                 endif
  752.                 CloseRegKey $(RASKey)
  753.                 ifstr(i) $($R1) == "OK"
  754.                     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  755.                     set !NTN_InstallMode = configure
  756.                     Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) 
  757.                     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  758.                 endif
  759.             endif
  760.         endif
  761.     endif
  762.     Ifint $(BillboardVisible) != 0
  763.         Shell "subroutn.inf" PopBillboard
  764.         Set BillboardVisible = 0
  765.     Endif
  766.     EndWait
  767. InstallOtherComponent = +
  768.     set Pos = 0
  769.     ForListDo $(InstallList)
  770.         ifstr(i) $($) == "1"
  771.             ifint $(Pos) != 0
  772.                 set CurrentFilename = *($(OptionFileList),$(Pos))
  773.                 set CurrentInstallOption = *($(TcpOptionList),$(Pos))
  774.                 debug-output $(CurrentFilename)"..."$(CurrentInstallOption)
  775.                 Shell $(CurrentFilename) "InstallOption" +
  776.                     $(!STF_LANGUAGE) $(CurrentInstallOption) +
  777.                     $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  778.             endif
  779.         endif
  780.         set-add Pos = $(Pos) 1
  781.     EndForListDo
  782.     goto successful
  783. configureadapter = +
  784.     ifstr(i) $(Option) == "TC"
  785.         OpenRegKey $(!REG_H_LOCAL) "" $(ParametersKeyName) $(MAXIMUM_ALLOWED) ParametersKey
  786.         GetRegValue $(ParametersKey) "EnableDHCP" EnableDHCPInfo
  787.         Set FirstTimeBinding = 0
  788.         set EnableDHCPFlag = 0
  789.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  790.             Set FirstTimeBinding = 1
  791.             set EnableDHCPFlag = *($(EnableDHCPInfo),4)
  792.             DeleteRegValue $(ParametersKey) "EnableDHCP"
  793.             ifint $(FirstTimeBinding) == 1
  794.                 ifint $(EnableDHCPFlag) == 0
  795.                     Shell $(IPINFOINF), GetIPInfo
  796.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  797.                     Else
  798.                         set DefaultGateway = $($R0)
  799.                         set IPAddressList  = $($R1)
  800.                         set SubnetMaskList = $($R2)
  801.                     Endif
  802.                 endif
  803.             endif
  804.         EndIf
  805.         CloseRegKey $(ParametersKey)
  806.         OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  807.         GetRegValue $(LinkageKey) "Bind" BindList
  808.         ifstr(i) $(BindList) == {}
  809.            Set BindList = ""
  810.         endif
  811.         ifstr(i) $(BindList) == ""
  812.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceStart "DHCP", 4
  813.             debug-output "OEMNXPTC.INF: no binding info; warning user"
  814.             read-syms InfoDlgCantConfigure
  815.             goto infomsg
  816.         endif
  817.         set OldVersionExisted = $(TRUE )
  818.         set CardList = ""
  819.         set CardCount = 0
  820.         ForListDo *($(BindList),4)
  821.             Split-String $($), "\", BindInfo
  822.             QueryListSize BindListSize $(BindInfo)
  823.             set CardName = *($(BindInfo),$(BindListSize))
  824.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(BindInfo),$(BindListSize)) $(MAXIMUM_ALLOWED) CardServiceKey
  825.             ifstr(i) $(CardServiceKey) != ""
  826.                 CloseRegKey $(CardServiceKey)
  827.                 set-add CardCount = $(CardCount),1
  828.                 ifstr $(CardList) == ""
  829.                     set CardList = {$(CardName)}
  830.                 else
  831.                     set CardList = >($(CardList),$(CardName))
  832.                 endif
  833.             endif
  834.         EndForListDo
  835.         debug-output $(CardList)
  836.         set OldCardList = $(CardList)
  837.         set CardList = ""
  838.         set CardServiceKey = ""
  839.         set CardCount = 1
  840.         ForListDo $(OldCardList)
  841.             ifstr(i) $(CardServiceKey) == ""
  842.                 ifstr $(CardList) == ""
  843.                     set CardList = $($)
  844.                 else
  845.                     set CardList = $(CardList)"@"$($)
  846.                 endif
  847.                 debug-output "Doing:"$($)
  848.                 debug-output $(CardList)
  849.                 set DefaultIPAddress = *($(IPAddressList),$(CardCount))
  850.                 set DefaultSubnetMask = *($(SubnetMaskList),$(CardCount))
  851.                 OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($)"\Parameters" $(MAXIMUM_ALLOWED) ServiceParamKey
  852.                 ifstr(i) $(ServiceParamKey) != ""
  853.                     OpenRegKey $(ServiceParamKey) "" "Tcpip" $(MAXIMUM_ALLOWED) TCPIPKey
  854.                     GetRegValue $(ParametersKey) "AutoIPAddress" AutoIPInfo
  855.                     set AutoIPFlag = *($(AutoIPInfo),4)
  856.                     set EnableDHCPForThisAdapter = $(EnableDHCPFlag)
  857.                     ifint $(AutoIPFlag) == 1
  858.                         set EnableDHCPForThisAdapter = 0
  859.                     endif
  860.                     ifstr(i) $(TCPIPKey) == ""
  861.                         CreateRegKey $(ServiceParamKey) {"Tcpip",$(NoTitle),GenericClass} "" +
  862.                         $(MAXIMUM_ALLOWED) "" TCPIPKey
  863.                         debug-output "set Parameters"
  864.                         debug-output "EnableDHCPFlag:"$(EnableDHCPForThisAdapter)
  865.                         set NewValueList = {{EnableDHCP,$(NoTitle),$(!REG_VT_DWORD),$(EnableDHCPForThisAdapter)},+
  866.                                         {UseZeroBroadcast,$(NoTitle),$(!REG_VT_DWORD),0},+
  867.                                         {LLInterface,$(NoTitle),$(!REG_VT_SZ),""}}
  868.                         Shell  $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  869.                         ifstr(i) $(TCPIPKey) != ""
  870.                             debug-output $(RegistryErrorIndex)
  871.                             ifint $(EnableDHCPForThisAdapter) == 1
  872.                                 set NewValueList = {{IPAddress,$(NoTitle),$(!REG_VT_MULTI_SZ),{"0.0.0.0"}},+
  873.                                                     {DefaultGateway,$(NoTitle),$(!REG_VT_MULTI_SZ),{}},+
  874.                                                     {SubnetMask,$(NoTitle),$(!REG_VT_MULTI_SZ),{"0.0.0.0"}}}
  875.                                 Shell  $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  876.                                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  877.                                     Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  878.                                     goto ShellCodeError
  879.                                 endif
  880.                             else
  881.                                 ifstr(i) $(DefaultIPAddress) != ""
  882.                                     set IPAddressInfo = {}
  883.                                     GetRegValue $(TCPIPKey) "IPAddress" IPAddressInfo
  884.                                     set IPAddress = *($(IPAddressInfo), 4)
  885.                                     ifstr(i) $(IPAddress) == ""
  886.                                         set NewValueList = {{IPAddress,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultIPAddress)}}}
  887.                                         Shell  $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  888.                                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  889.                                             Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  890.                                             goto ShellCodeError
  891.                                         endif
  892.                                     endif
  893.                                 endif
  894.                                 ifstr(i) $(DefaultSubnetMask) != ""
  895.                                     set SubnetMasInfo = {}
  896.                                     GetRegValue $(TCPIPKey) "SubnetMask" SubnetMaskInfo
  897.                                     set SubnetMask = *($(SubnetMaskInfo), 4)
  898.                                     ifstr(i) $(SubnetMask) == ""
  899.                                         set NewValueList = {{SubnetMask,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultSubnetMask)}}}
  900.                                         Shell  $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  901.                                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  902.                                             Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  903.                                             goto ShellCodeError
  904.                                         endif
  905.                                     endif
  906.                                 endif
  907.                                 ifstr(i) $(DefaultGateway) != ""
  908.                                     GetRegValue $(TCPIPKey) "DefaultGateway" GatewayInfo
  909.                                     set Gateway = *($(GatewayInfo), 4)
  910.                                     ifstr(i) $(Gateway) == ""
  911.                                         set NewValueList = {{DefaultGateway,$(NoTitle),$(!REG_VT_MULTI_SZ),{$(DefaultGateway)}}}
  912.                                         Shell  $(UtilityInf), AddValueList, $(TCPIPKey), $(NewValueList)
  913.                                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  914.                                             Debug-Output "OEMNXPTC.INF: ShellCode error: cannot write default subnet mask error."
  915.                                             goto ShellCodeError
  916.                                         endif
  917.                                     endif
  918.                                 endif
  919.                             endif
  920.                         endif
  921.                     endif
  922.                     CloseRegKey $(TCPIPKey)
  923.                 endif
  924.                 CloseRegKey $(ServiceParamKey)
  925.                 set-add CardCount = $(CardCount),1
  926.             Endif
  927.         EndForListDo
  928.         ifstr(i) $(CardList) != ""
  929.             Ifstr(i) $(!NTN_InstallMode) == bind
  930.                 set FLibraryErrCtl = 1
  931.                 LibraryProcedure ResultList, $(!TCPCFG_HANDLE), TcpCfgCheck
  932.                 set FLibraryErrCtl = 0
  933.                 Set Result = *($(ResultList),1)
  934.                 ifint $(Result) == 0
  935.                     Debug-Output "OEMNXPTC.INF:  reconfiguration not required"
  936.                     set CommonStatus = STATUS_USERCANCEL
  937.                     goto end
  938.                 endif
  939.             endif
  940.             set FLibraryErrCtl = 1
  941.             LibraryProcedure ResultList, $(!TCPCFG_HANDLE), CPlTcpip, $(!STF_HWND), $(CardList), $(!STF_COMPUTERNAME), ""
  942.             set FLibraryErrCtl = 0
  943.             Set Result = *($(ResultList),1)
  944.             ifint $(Result) == 2
  945.                 set CommonStatus = STATUS_REBOOT
  946.             else
  947.                 set CommonStatus = STATUS_USERCANCEL
  948.             endif
  949.         else
  950.             set CommonStatus = STATUS_USERCANCEL
  951.         endif
  952.     else
  953.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  954.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  955.             Debug-Output "OEMNXPTC.INF: ShellCode error: cannot get an error string."
  956.             goto ShellCodeError
  957.         endif
  958.         set Error = $($R0)
  959.         set from = end
  960.         set to = end
  961.         goto nonfatalinfo
  962.     endif
  963.     goto end
  964. bindingadapter =+
  965.     ifstr(i) $(Option) == "TC"
  966.         ForListDo {"Browser","NetLogon"}
  967.             OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  968.             ifstr(i) $(ServicesKey) != ""
  969.                 GetRegValue $(ServicesKey) "DependOnService" ServicesList
  970.                 debug-output "DependOnService:"$(ServicesList)
  971.                 set ServiceValues = *($(ServicesList),4)
  972.                 debug-output "DependOnService:"$(ServiceValues)
  973.                 ifstr(i) $(ServiceValues) == {}
  974.                     Set ServiceValues = {"LmHosts"}
  975.                     LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  976.                 else-ifstr(i) $(ServiceValues) == ""
  977.                     Set ServiceValues = {"LmHosts"}
  978.                     LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  979.                 else-ifcontains(i) "LMHOSTS" in $(ServiceValues)
  980.                 else
  981.                     Set ServiceValues = >($(ServiceValues), "LmHosts")
  982.                     LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(ServiceValues), "", "", ""
  983.                 endif
  984.                 CloseRegKey $(ServicesKey)
  985.             endif
  986.         EndForListDo
  987.         debug-output "binding for NetBT"
  988.         OpenRegKey $(!REG_H_LOCAL) "" $(NetBTLinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  989.         GetRegValue $(LinkageKey) "Bind" BindList
  990.         set CombineBindInfo = *($(BindList),4)
  991.         CloseRegKey $(LinkageKey)
  992.         Shell "nbinfo.inf" CheckMixRpcProtocol "NetBT" 5 "tcpip" "ncacn_nb_tcp" "rpcltc5.dll" "rpclts5.dll"
  993.         OpenRegKey $(!REG_H_LOCAL) "" $(NetBTLinkageKeyName)"\Disabled" $(MAXIMUM_ALLOWED) LinkageKey
  994.         GetRegValue $(LinkageKey) "Bind" BindList
  995.         ForListDo *($(BindList),4)
  996.             set CombineBindInfo = >($(CombineBindInfo), $($))
  997.         EndForListDo
  998.         CloseRegKey $(LinkageKey)
  999.         OpenRegKey $(!REG_H_LOCAL) "" $(AdaptersKeyName) $(MAXIMUM_ALLOWED) AdaptersKey
  1000.         EnumRegKey $(AdaptersKey) AdaptersListInfo
  1001.         set AdaptersList = {}
  1002.         ForListDo $(AdaptersListInfo)
  1003.             ifstr(i) $(AdaptersList) == {}
  1004.                 set AdaptersList = {*($($),1)}
  1005.             else
  1006.                 set AdaptersList = >($(AdaptersList),*($($),1))
  1007.             endif
  1008.         EndForListDo
  1009.         set CardList = {}
  1010.         set CreateCardList = {}
  1011.         ForListDo $(CombineBindInfo)
  1012.             Split-String $($), "\", BindInfo
  1013.             QueryListSize BindListSize $(BindInfo)
  1014.             set CardName = *($(BindInfo),$(BindListSize))
  1015.             ifstr(i) $(CardList) == {}
  1016.                 set CardList = {$(CardName)}
  1017.             else
  1018.                 set CardList = >($(CardList),$(CardName))
  1019.             endif
  1020.             ifContains(i) $(CardName) not-in $(AdaptersList)
  1021.                 ifstr(i) $(CreateCardList) == {}
  1022.                     set CreateCardList = {$(CardName)}
  1023.                 else
  1024.                     set CreateCardList = >($(CreateCardList),$(CardName))
  1025.                 endif
  1026.             endif
  1027.         EndForListDo
  1028.         set DeleteCardList = {}
  1029.         ForListDo $(AdaptersList)
  1030.             ifcontains(i) $($) not-in $(CardList)
  1031.                 ifstr(i) $(DeleteCardList) == {}
  1032.                     set DeleteCardList = {$($)}
  1033.                 else
  1034.                     set DeleteCardList = >($(DeleteCardList),$($))
  1035.                 endif
  1036.             endif
  1037.         EndForListDo
  1038.         ForListDo $(CreateCardList)
  1039.             CreateRegKey $(AdaptersKey) {$($),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" CardKey
  1040.             CloseRegKey $(CardKey)
  1041.         EndForListDo
  1042.         ForListDo $(DeleteCardList)
  1043.             DeleteRegKey $(AdaptersKey) $($)
  1044.         EndForListDo
  1045.         CloseRegKey $(AdaptersKey)
  1046.         debug-output "binding for TC"
  1047.         goto configureadapter
  1048.     endif
  1049.     goto successful
  1050. removeadapter = +
  1051.     Shell $(UtilityInf) RemoveDependentComponents Microsoft TCPIP
  1052.     Shell $(UtilityInf) RemoveRpcProtocol "ncadg_ip_udp"
  1053.     Shell $(UtilityInf) RemoveRpcProtocol "ncacn_ip_tcp"
  1054.     Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_tcp"
  1055.     Shell $(UtilityInf) RemoveServiceProvider $(ProviderName)
  1056.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1057.         Debug-Output "OEMNXPTC.INF: ShellCode error"
  1058.         goto ShellCodeError
  1059.     endif
  1060.     set RegistryErrorIndex = $($R0)
  1061.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1062.         goto fatalregistry
  1063.     endif
  1064.     ForListDo  $(OEM_ABANDON_SOFTWARE)
  1065.         ifstr(i) $($) == "Tcpip"
  1066.             OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  1067.             GetRegValue $(LinkageKey) "Bind" BindList
  1068.             ForListDo *($(BindList),4)
  1069.                 Split-String $($), "\", BindInfo
  1070.                 QueryListSize BindListSize $(BindInfo)
  1071.                 set CardName = *($(BindInfo),$(BindListSize))
  1072.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(BindInfo),$(BindListSize))"\Parameters" $(MAXIMUM_ALLOWED) CardParamKey
  1073.                 ifstr(i) $(CardParamKey) != ""
  1074.                     DeleteRegTree $(CardParamKey) "Tcpip"
  1075.                     CloseRegKey $(CardParamKey)
  1076.                 endif
  1077.             EndForListDo
  1078.             Shell $(UtilityInf), RemoveWinsockInfo, $(ProductTCName)
  1079.             set RegistryErrorIndex = $($R0)
  1080.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1081.                 Debug-Output "OEMNXPTC.INF: Registry error: remove Winsock Info."
  1082.             Endif
  1083.         endif
  1084.         debug-output "Remove component: "$($)
  1085.         ifstr(i) $($) == "Streams"
  1086.             Shell $(UtilityInf), RemoveStreams
  1087.         else
  1088.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1089.         endif
  1090.     EndForListDo
  1091.     ForListDo  $(OEM_ABANDON_OPTIONS)
  1092.         debug-output "Remove component: "$($)
  1093.         Ifstr(i) $($) == $(ProductLOOPName)
  1094.             Set UseSvcctrl = "NO"
  1095.         Else
  1096.             Set UseSvcctrl = "YES"
  1097.         Endif
  1098.         ifstr(i) $($) == $(ProductLMHOSTSName)
  1099.             debug-output "Remove "$($)"'s LMHOSTS dependency"
  1100.             ForListDo {"Browser","NetLogon"}
  1101.                 OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  1102.                 ifstr(i) $(ServicesKey) != ""
  1103.                     GetRegValue $(ServicesKey) "DependOnService" ServicesList
  1104.                     debug-output "DependOnService List:"$(ServicesList)
  1105.                     set ServiceValues = *($(ServicesList),4)
  1106.                     debug-output "ServiceValues: "$(ServiceValues)
  1107.                     ifcontains(i) "LMHOSTS" in $(ServiceValues)
  1108.                         set NewServiceValues = {}
  1109.                         ForListDo $(ServiceValues)
  1110.                             ifstr(i) $($) != "LmHosts"
  1111.                                 set NewServiceValues = >($(NewServiceValues), $($))
  1112.                             endif
  1113.                         EndForListDo
  1114.                         debug-output "Final dependency list for "$($)": "$(NewServiceValues)
  1115.                         LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(NewServiceValues), "", "", ""
  1116.                     else
  1117.                     endif
  1118.                     CloseRegKey $(ServicesKey)
  1119.                 endif
  1120.             EndForListDo
  1121.         endif
  1122.         Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1123.     EndForListDo
  1124.     goto end
  1125. UpgradeSoftware = +
  1126.     OpenRegKey $(!REG_H_LOCAL) "" $(OldProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1127.     Ifstr(i) $(KeyProduct) == $(KeyNull)
  1128.         goto end
  1129.     endif
  1130.     GetRegValue $(KeyProduct) "DefaultGateway" DefaultGatewayList
  1131.     set DefaultGatewayValue = *($(DefaultGatewayList),4)
  1132.     Ifstr(i) $(DefaultGatewayValue) != $(KeyNull)
  1133.         install "Install-Update"
  1134.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1135.             goto fatal
  1136.         endif
  1137.         CloseRegKey $(KeyProduct)
  1138.         set FLibraryErrCtl = 1
  1139.         ifstr(i) $(!UpgradeEnableDhcp) == ""
  1140.             LibraryProcedure ResultList $(!TCPCFG_HANDLE), UpgradeTcpip, $(!STF_HWND) "NO" "YES" 
  1141.         else
  1142.             LibraryProcedure ResultList $(!TCPCFG_HANDLE), UpgradeTcpip, $(!STF_HWND) "YES" $(!UpgradeEnableDhcp) 
  1143.         endif
  1144.         set FLibraryErrCtl = 0
  1145.         set UserWantsDHCP = *($(ResultList),2)
  1146.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\Parameters" $(MAXIMUM_ALLOWED) TcpipParamKey
  1147.         ifstr(i) $(TcpipParamKey) != ""
  1148.             GetRegValue $(TcpipParamKey) "DNSLookupOrder" LookupInfo
  1149.             debug-output "LookupOrder:"$(LookupInfo)
  1150.             GetRegValue $(TcpipParamKey) "Domain" DomainInfo
  1151.             debug-output "Domain:"$(DomainInfo)
  1152.             GetRegValue $(TcpipParamKey) "Hostname" HostnameInfo
  1153.             debug-output "Hostname:"$(HostnameInfo)
  1154.             GetRegValue $(TcpipParamKey) "NameServer" NameServerInfo
  1155.             debug-output "NameServer:"$(NameServerInfo)
  1156.             GetRegValue $(TcpipParamKey) "SearchList" SearchListInfo
  1157.             debug-output "SearchListInfo:"$(SearchListInfo)
  1158.             CloseRegKey $(TcpipParamKey)
  1159.         endif
  1160.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Nbt\Parameters" $(MAXIMUM_ALLOWED) NbtParamKey
  1161.         ifstr(i) $(NbtParamKey) != ""
  1162.             GetRegValue $(NbtParamKey) "ScopeID" ScopeIDInfo
  1163.             debug-output "ScopeID:"$(ScopeID)
  1164.             CloseRegKey $(NbtParamKey)
  1165.         endif
  1166.         set OEM_ABANDON_OPTIONS = {+
  1167.             "TcpipSys",+
  1168.             "NbtSys",+
  1169.             "Telnet",+
  1170.             "LMHOSTS",+
  1171.             "Telnetsys",+
  1172.             "Loop"}
  1173.         set OEM_ABANDON_SOFTWARE = {+
  1174.             "Tcpip",+
  1175.             "Nbt",+
  1176.             "Streams"}
  1177.         Shell $(UtilityInf) RemoveRpcProtocol "ncacn_ip_tcp"
  1178.         Ifstr(i) $($0) != NO_ERROR
  1179.             Debug-Output "OEMNXPTC.INF: ERROR deleting RPC protocol data"
  1180.         Endif
  1181.         Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_tcp"
  1182.         Ifstr(i) $($0) != NO_ERROR
  1183.             Debug-Output "OEMNXPTC.INF: ERROR deleting RPC protocol data (2)"
  1184.         Endif
  1185.         ForListDo  $(OEM_ABANDON_SOFTWARE)
  1186.             debug-output "Remove component: "$($)
  1187.             ifstr(i) $($) == "Streams"
  1188.                 Shell $(UtilityInf), RemoveStreams
  1189.             else
  1190.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1191.             endif
  1192.             ifstr(i) $($) == "Tcpip"
  1193.                 Shell $(UtilityInf), RemoveWinsockInfo, $($)
  1194.                 set RegistryErrorIndex = $($R0)
  1195.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1196.                     Debug-Output "OEMNXPTC.INF: Registry error: remove Winsock Info."
  1197.                 Endif
  1198.             endif
  1199.         EndForListDo
  1200.         ForListDo  $(OEM_ABANDON_OPTIONS)
  1201.             debug-output "Remove component: "$($)
  1202.             Ifstr(i) $($) == "loop"
  1203.                 Set UseSvcctrl = "NO"
  1204.             Else
  1205.                 Set UseSvcctrl = "YES"
  1206.             Endif
  1207.             ifstr(i) $($) == "lmhosts"
  1208.                 debug-output "Remove "$($)"'s LMHOSTS dependency"
  1209.                 ForListDo {"Browser","NetLogon"}
  1210.                     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$($) $(MAXIMUM_ALLOWED) ServicesKey
  1211.                     ifstr(i) $(ServicesKey) != ""
  1212.                         GetRegValue $(ServicesKey) "DependOnService" ServicesList
  1213.                         debug-output "DependOnService List:"$(ServicesList)
  1214.                         set ServiceValues = *($(ServicesList),4)
  1215.                         debug-output "ServiceValues: "$(ServiceValues)
  1216.                         ifcontains(i) "LMHOSTS" in $(ServiceValues)
  1217.                             set NewServiceValues = {}
  1218.                             ForListDo $(ServiceValues)
  1219.                                 ifstr(i) $($) != "LmHosts"
  1220.                                     set NewServiceValues = >($(NewServiceValues), $($))
  1221.                                 endif
  1222.                             EndForListDo
  1223.                             debug-output "Final dependency list for "$($)": "$(NewServiceValues)
  1224.                             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(NewServiceValues), "", "", ""
  1225.                         else
  1226.                         endif
  1227.                         CloseRegKey $(ServicesKey)
  1228.                     endif
  1229.                 EndForListDo
  1230.             endif
  1231.             Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1232.         EndForListDo
  1233.         set OldSTFInstallMode = $(!STF_INSTALL_MODE)
  1234.         set !STF_INSTALL_MODE = EXPRESS
  1235.         set OldInstallMode = $(!NTN_InstallMode)
  1236.         set !NTN_InstallMode = install
  1237.         Shell "" "InstallOption" $(!STF_LANGUAGE) "TC" $(!STF_SRCDIR) "NO" "NO" "NO"
  1238.         set !STF_INSTALL_MODE = $(OldSTFInstallMode)
  1239.         set !NTN_InstallMode = $(OldInstallMode)
  1240.         OpenRegKey $(!REG_H_LOCAL) "" $(ParametersKeyName) $(MAXIMUM_ALLOWED) TcpipParamKey
  1241.         ifstr(i) $(TcpipParamKey) != ""
  1242.             set NewValueList = {$(LookupInfo),$(DomainInfo),$(HostnameInfo),$(NameServerInfo),$(SearchListInfo)}
  1243.             Shell  $(UtilityInf), AddValueList, $(TcpipParamKey), $(NewValueList)
  1244.             SetRegValue $(TcpipParamKey) {"EnableDHCP",$(NoTitle),$(!REG_VT_DWORD),$(UserWantsDHCP)}
  1245.             CloseRegKey $(TcpipParamKey)
  1246.         endif
  1247.         OpenRegKey $(!REG_H_LOCAL) "" $(NetBTParamKeyName) $(MAXIMUM_ALLOWED) NetbtParamKey
  1248.         ifstr(i) $(NetbtParamKey) != ""
  1249.             Shell  $(UtilityInf), AddValueList, $(NetbtParamKey), {$(ScopeIDInfo)}
  1250.             CloseRegKey $(NetbtParamKey)
  1251.         endif
  1252.     else
  1253.         install "Install-Update"
  1254.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1255.             goto fatal
  1256.         endif
  1257.         CloseRegKey $(KeyProduct)
  1258.         OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\NetBT\CurrentControlSet\NetRules" $(MAXIMUM_ALLOWED) NetRulesKey
  1259.         ifstr(i) $(NetRulesKey) != ""
  1260.             SetRegValue $(NetRulesKey) {"use",$(NoTitle),$(!REG_VT_SZ),"transport yes yes"}
  1261.             CloseRegKey $(NetRulesKey)
  1262.         endif
  1263.     Shell $(UtilityInf) RemoveNetworkProvider $(ProviderName)
  1264.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\DHCP\Parameters\Options" $(MAXIMUM_ALLOWED) KeyOptions
  1265.         ifstr(i) $(KeyOptions) != ""
  1266.             OpenRegKey $(KeyOptions) "" "1" $(MAXIMUM_ALLOWED) Key1
  1267.             ifstr(i) $(Key1) == ""
  1268.                 CreateRegKey $(KeyOptions) {"1",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key1
  1269.                 Shell $(UtilityInf) AddValueList, $(Key1),+
  1270.                     {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\?\Parameters\Tcpip\DhcpSubnetMaskOpt"},+
  1271.                     {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_MULTI_SZ)}}
  1272.             endif
  1273.             CloseRegKey $(Key1)
  1274.             OpenRegKey $(KeyOptions) "" "15" $(MAXIMUM_ALLOWED) Key15
  1275.             ifstr(i) $(Key15) == ""
  1276.                 CreateRegKey $(KeyOptions) {"15",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" Key15
  1277.                 Shell $(UtilityInf) AddValueList, $(Key15),+
  1278.                     {{"RegLocation", $(NoTitle), $(!REG_VT_SZ), "System\CurrentControlSet\Services\Tcpip\Parameters\DhcpDomain"},+
  1279.                     {"KeyType", $(NoTitle), $(!REG_VT_DWORD), $(!REG_VT_SZ)}}
  1280.             endif
  1281.             CloseRegKey $(Key15)
  1282.         endif
  1283.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\ServiceProvider" $(MAXIMUM_ALLOWED) ProviderKey
  1284.         ifstr(i) $(ProviderKey) == ""
  1285.             Shell $(UtilityInf), AddServiceProvider, $(ProviderName), +
  1286.                 $(ProductProviderImagePath), 8
  1287.             set RegistryErrorIndex = $($R0)
  1288.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1289.                 EndWait
  1290.                 Debug-Output "OEMNXPTC.INF: Registry error: add software components"
  1291.                 goto fatalregistry
  1292.             endif
  1293.             OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip" $(MAXIMUM_ALLOWED) TcpSvcKeyHandle
  1294.             ifstr(i) $(TcpSvcKeyHandle) != ""
  1295.                 OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\ServiceProvider" $(MAXIMUM_ALLOWED) KeyNetworkProvider
  1296.                 ifstr(i) $(KeyNetworkProvider) == ""
  1297.                    CreateRegKey $(TcpSvcKeyHandle) {"ServiceProvider",$(NoTitle),GenericClass} "" +
  1298.                         $(MAXIMUM_ALLOWED) "" KeyNetworkProvider
  1299.                 endif
  1300.                 set NewValueList = {{DnsPriority,$(NoTitle),$(!REG_VT_DWORD),2000},+
  1301.                            {Name,$(NoTitle),$(!REG_SZ),$(ProviderDisplayName)},+
  1302.                            {HostsPriority,$(NoTitle),$(!REG_VT_DWORD),500},+
  1303.                            {LocalPriority,$(NoTitle),$(!REG_VT_DWORD),499},+
  1304.                            {ProviderPath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ProductProviderImagePath)},+
  1305.                            {NetbtPriority,$(NoTitle),$(!REG_VT_DWORD),2001}}
  1306.                 Shell  $(UtilityInf), AddValueList, $(KeyNetworkProvider), $(NewValueList)
  1307.                 CloseRegKey $(KeyNetworkProvider)
  1308.                 CloseRegKey $(TcpSvcKeyHandle)
  1309.             endif
  1310.         else
  1311.             CloseRegKey $(ProviderKey)
  1312.         endif
  1313.         OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\Tcpip\Parameters" $(MAXIMUM_ALLOWED) TcpParmKeyHandle
  1314.         ifstr(i) $(TcpParmKeyHandle) != ""
  1315.             CreateRegKey $(TcpParmKeyHandle) {"PersistentRoutes",$(NoTitle),GenericClass} "" +
  1316.                     $(MAXIMUM_ALLOWED) "" KeyPersistentRoutes
  1317.             CloseRegKey $(KeyPersistentRoutes)
  1318.             CloseRegKey $(TcpParmKeyHandle)
  1319.         endif
  1320.     endif
  1321.     goto end
  1322. successful = +
  1323.     goto end
  1324. infomsg =+
  1325.    read-syms InfoDlg
  1326.    ui start "Warning"
  1327.    set CommonStatus = STATUS_USERCANCEL
  1328.    goto end
  1329. warning = +
  1330.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1331.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1332.         goto ShellCodeError
  1333.     endif
  1334.     ifstr(i) $($R1) == "OK"
  1335.         goto $(to)
  1336.     else-ifstr(i) $($R1) == "CANCEL"
  1337.         goto $(from)
  1338.     else
  1339.         goto "end"
  1340.     endif
  1341. nonfatalinfo = +
  1342.     Set CommonStatus = STATUS_USERCANCEL
  1343.     Set Severity = STATUS
  1344.     goto nonfatalmsg
  1345. nonfatal = +
  1346.     Set Severity = NONFATAL
  1347.     goto nonfatalmsg
  1348. nonfatalmsg = +
  1349.     ifstr(i) $(Error) == ""
  1350.         Set Severity = NONFATAL
  1351.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1352.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1353.             goto ShellCodeError
  1354.         endif
  1355.         set Error = $($R0)
  1356.     endif
  1357.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1358.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1359.         goto ShellCodeError
  1360.     endif
  1361.     ifstr(i) $($R1) == "OK"
  1362.         goto $(from)
  1363.     else
  1364.         goto "end"
  1365.     endif
  1366. fatalregistry = +
  1367.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1368.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1369.         goto ShellCodeError
  1370.     endif
  1371.     set Error = $($R0)
  1372.     goto fatal
  1373. fatal = +
  1374.     ifstr(i) $(Error) == ""
  1375.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1376.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1377.             goto ShellCodeError
  1378.         endif
  1379.         set Error = $($R0)
  1380.     endif
  1381.     Ifint $(BillboardVisible) != 0
  1382.         Shell "subroutn.inf" PopBillboard
  1383.         Set BillboardVisible = 0
  1384.     Endif
  1385.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1386.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1387.         goto ShellCodeError
  1388.     endif
  1389.    goto setfailed
  1390. ShellCodeError = +
  1391.     set DlgType      = "MessageBox"
  1392.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1393.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1394.     set STF_MB_TYPE  = 1
  1395.     set STF_MB_ICON  = 3
  1396.     set STF_MB_DEF   = 1
  1397.     ui start "Error Message"
  1398.     goto setfailed
  1399. setfailed = +
  1400.     set CommonStatus = STATUS_FAILED
  1401.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1402.         set OEM_ABANDON_ON = FALSE
  1403.         goto removeadapter
  1404.     endif
  1405.     goto end
  1406. end = +
  1407.     freeLibrary $(!TCPCFG_HANDLE)
  1408.     goto term
  1409. term = +
  1410.     Return $(CommonStatus)
  1411. [CreateEventLog]
  1412.     read-syms GeneralConstants
  1413.     set NameOfService = $($0)
  1414.     set EventFile     = $($1)
  1415.     set TypeSupported = $($2)
  1416.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\EventLog\System" $(MAXIMUM_ALLOWED) KeyEventLog
  1417.     Ifstr $(KeyEventLog) != ""
  1418.         OpenRegKey $(KeyEventLog) "" $(NameOfService) $(MAXIMUM_ALLOWED) KeyService
  1419.            ifstr(i) $(KeyService) == ""
  1420.                CreateRegKey $(KeyEventLog) {$(NameOfService),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyService
  1421.            endif
  1422.            Ifstr $(KeyService) != ""
  1423.                SetRegValue $(KeyService) {EventMessageFile,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(EventFile)}
  1424.                SetRegValue $(KeyService) {TypesSupported,$(NoTitle),$(!REG_VT_DWORD),$(TypeSupported)}
  1425.            endif
  1426.         Endif
  1427.     endif
  1428. CreateEventLogEnd = +
  1429.     return NO_ERROR
  1430. [GetFilesSize]
  1431.     set FileSizeList = >(>(>(^(Files-TC,3),^(Files-TCPIPEXE,3)),^(Files-ETC,3)),^(Files-LMHOST,3))
  1432.     set TotalSize = 0
  1433.     ForListDo $(FileSizeList)
  1434.         ForListDo $($)
  1435.             Split-String $($) "=" SplitString
  1436.             set Size = *($(SplitString),3)
  1437.             set-add TotalSize = $(TotalSize) $(Size)
  1438.         EndForListDo
  1439.     EndForListDo
  1440.     set-div SizeInK = $(TotalSize) 1024
  1441.     return $(SizeInK)
  1442. [Install-Option]
  1443.     set STF_VITAL = ""
  1444.     ifstr(i) $(AddCopy) == "YES"
  1445.         AddSectionFilesToCopyList Files-TC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1446.         AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1447.         AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1448.         AddSectionFilesToCopyList Files-LMHOST $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1449.     endif
  1450.     ifstr(i) $(DoCopy) == "YES"
  1451.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1452.        Debug-Output "OEMNXPTC.INF: *** CopyFilesInCopyList [2]"
  1453.        CopyFilesInCopyList
  1454.     endif
  1455.     ifstr(i) $(DoConfig) == "YES"
  1456.     endif
  1457.     Exit
  1458. [Install-Update]
  1459.    set STF_VITAL        = ""
  1460.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1461.    AddSectionFilesToCopyList Files-TC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1462.    AddSectionFilesToCopyList Files-TCPIPEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1463.    AddSectionFilesToCopyList Files-LMHOST $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1464.    AddSectionFilesToCopyList Files-ETC-Upgrade $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  1465.    Exit
  1466. [Source Media Descriptions]
  1467.     1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom.w
  1468. [Signature]
  1469.     FileType = MICROSOFT_FILE
  1470. [GetSignature]
  1471.     read-syms Signature
  1472.     return $(FileType)
  1473. [ProductType]
  1474. STF_PRODUCT  = Winnt
  1475. STF_PLATFORM = ppc
  1476. [Files-Inf]
  1477. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1478. [Files-ETC-Upgrade]
  1479. 1,HOSTS , SIZE=999, RENAME=HOSTS.SAM
  1480. 1,SERVICES , SIZE=999, RENAME=SERVICES.SAM
  1481. [Files-ETC]
  1482. 1,HOSTS , SIZE=999
  1483. 1,NETWORKS , SIZE=999
  1484. 1,PROTOCOL , SIZE=999
  1485. 1,SERVICES , SIZE=999
  1486. [Files-LMHOST]
  1487. 1,LMHOSTS.SAM , SIZE=999
  1488. [Files-TC]
  1489. 1,NETBT.SYS , SIZE=999
  1490. 1,TCPIP.SYS , SIZE=999
  1491. [Files-TCPIPEXE]
  1492. 1, DHCPCSVC.DLL, SIZE=999
  1493. 1, DHCPSAPI.DLL, SIZE=999
  1494. 1, ICMP.DLL, SIZE=999
  1495. 1, IPCONFIG.EXE, SIZE=999
  1496. 1, NBTSTAT.EXE, SIZE=999
  1497. 1, TCPSVCS.EXE, SIZE=999
  1498. 1, TRACERT.EXE, SIZE=999
  1499. 1,ARP.EXE , SIZE=999
  1500. 1,HOSTNAME.EXE , SIZE=999
  1501. 1,INETMIB1.DLL , SIZE=999
  1502. 1,IPINFO.INF , SIZE=999
  1503. 1,LMHSVC.DLL , SIZE=999
  1504. 1,NETSTAT.EXE , SIZE=999
  1505. 1,PING.EXE , SIZE=999
  1506. 1,ROUTE.EXE , SIZE=999
  1507. [LanguagesSupported]
  1508.     ENG
  1509. [OptionsTextENG]
  1510.     TC     = "TCP/IP Protocol and related components"
  1511. [FileConstantsENG]
  1512. ProCaption   = "Windows NT Setup"
  1513. ProCancel    = "Cancel"
  1514. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1515.                "Are you sure you want to cancel copying files?"
  1516. ProCancelCap = "Network Setup Message"
  1517. ProText1     = "Copying:"
  1518. ProText2     = "To:"
  1519. NoNewComponents = "No New Components to Install."
  1520. FunctionTitle   = "TCP/IP Setup"
  1521. ProductNETBTDescription           = "NetBT System Driver"
  1522. ProductNETBTDisplayName   = "WINS Client(TCP/IP)"
  1523. ProductNETBTTitle         = "WINS Client(TCP/IP)"
  1524. ProductTELNETDisplayName = "Telnet"
  1525. ProductTELNETTitle      = "Telnet Networking Support Environment"
  1526. ProductTELNETSYSDisplayName = "Telnetsys"
  1527. ProductTELNETSYSTitle     = "Telnet Driver"
  1528. ProductLMHOSTSDisplayName = "TCP/IP NetBIOS Helper"
  1529. ProductLMHOSTSTitle     = "TCP/IP NetBIOS Helper"
  1530. ProductDHCPDisplayName = "DHCP Client"
  1531. ProductDHCPTitle     = "DHCP Client"
  1532. ProductTCDisplayName = "TCP/IP Service"
  1533. ProductTCTitle     = "TCP/IP Protocol"
  1534. ProductTCDescription         = "TCP/IP Protocol Driver"
  1535. ProviderDisplayName     = "TCP/IP"
  1536. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  1537. ShellCodeErrorText      = "Shell Code Error."
  1538. RASRebindError = "Setup has discovered that you have Remote Access Services installed. Do you want to configure RAS to support the TCP/IP protocol?"
  1539. [DialogConstantsENG]
  1540. Help        = "&Help"
  1541. Exit        = "Cancel"
  1542. OK          = "OK"
  1543. HelpContext = ""
  1544. Continue    = "Continue"
  1545. Cancel      = "Cancel"
  1546. [FileDependentDlgENG]
  1547. [InfoDlg]
  1548. STF_MB_TITLE = "Information Message"
  1549. DlgType = "MessageBox"
  1550. STF_MB_TEXT  = $(InfoMsgText)
  1551. STF_MB_TYPE  = 1
  1552. STF_MB_ICON  = 5
  1553. STF_MB_DEF   = 1
  1554. [InfoDlgCantConfigure]
  1555. InfoMsgText = "The TCP/IP service is not currently configured to use any adapters."+
  1556.     "  If you have just installed it, return to the Networks dialog and "+
  1557.     "click  OK.  You will then have the opportunity to configure the adapters."
  1558. [WarningDlgENG]
  1559. STF_MB_TITLE = "TCP/IP Setup Warning"
  1560. DlgType = "MessageBox"
  1561. STF_MB_TEXT  = $(Error)
  1562. STF_MB_TYPE  = 1
  1563. STF_MB_ICON  = 5
  1564. STF_MB_DEF   = 1
  1565. [Billboard1ENG]
  1566. Status = "Installing TCP/IP and related services..."
  1567.